<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body {
            padding: 0;
            margin: 0;
        }

        div,
        a {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        .bar {
            display: flex;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .bar a {
            padding: 10px 20px;
            margin: 0 20px;
            font-size: 20px;
            text-decoration: none;
            position: relative;
            transition: .5s;
            color: black;
        }

        .bar a:hover {
            color: white;
            background-color: black;
        }

        .bar a:before,
        .bar a:after {
            position: absolute;
            top: 0;
            left: 0;
            display: block;
            content: '';
            width: 100%;
            height: 100%;
            transition: .5s;
            opacity: 0;
        }

        .bar a:before {
            border-bottom: 1px solid black;
            border-left: 1px solid black;
            transform: translate(-30px, 30px);
        }

        .bar a:after {
            border-top: 1px solid black;
            border-right: 1px solid black;
            transform: translate(30px, -30px);
        }

        .bar a:hover:before,
        .bar a:hover:after {
            opacity: 1;
            transform: translate(0, 0) scale(1.1);
        }
    </style>
</head>
<body>
<div class="bar">
    <a href="#">Test</a>
    <a href="#">Test</a>
    <a href="#">Test</a>
    <a href="#">Test</a>
    <a href="#">Test</a>
    <a href="#">Test</a>
</div>
</body>

</html>